package com.cx.service.lcd.Impl;

import com.cx.pojo.Comment;
import com.cx.service.lcd.CommentService;
import com.cx.service.lcd.reposity.CommentRepository;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    CommentRepository commentRepository;
    //    public CommentServiceImpl() {
//        ApplicationContext ac = new ClassPathXmlApplicationContext("spring/spring-mongodb.xml");
//        mongoTemplate = (MongoTemplate) ac.getBean("mongoTemplate");
//    }
    @Override
    public List<JSONObject> findAllComments() {
        return commentRepository.findAllComments();
    }


    @Override
    public int insertComment(Comment comment) {
        return commentRepository.insertComment(comment);
    }

    @Override
    public void deleteComment() {

    }

    @Override
    public void updateComment() {

    }


}
